
/**
 * 所有坐骑
 */
export const mounts_names = ["宝贝葫芦", "神气小龟", "汗血宝马", "欢喜羊羊", "魔力斗兽", "披甲战狼", "闲云野鹤", "云魅仙鹿", "紫霞云麒", "玄冰灵虎", "七彩小驴", "玄火神驹", "粉红小驴", "神行小驴", "玉脂福羊", "吾皇", "战火穷奇", "白金战火穷奇"];

/**
 * 所有坐骑饰品
 */
export const mounts_jewelrys = ["展翅高飞", "旗开得胜", "霸王雄风", "独眼观天", "威武不屈", "深藏不露", "异域浓情", "流星天马", "威猛将军", "知情达理", "气宇轩昂", "如花似玉", "傲视天下", "铁血豪情", "唯我独尊", "叱咤风云", "异域风情", "假面勇者", "披星戴月", "霓裳魅影", "烈焰燃情", "天雨流芳", "灵光再现", "倾国倾城", "天使猪猪", "九尾冰狐",
];

/**
 * 坐骑等级经验
 */
export const mounts_level_exp = [50, 200, 450, 800, 1250, 1800, 2450, 3250, 4050, 5000, 6050, 7200, 8450, 9800, 11250, 12800, 14450, 16200, 18050, 20000, 22050, 24200,
    26450, 28800, 31250, 33800, 36450, 39200, 42050, 45000, 48050, 51200, 54450, 57800, 61250, 64800, 68450, 72200, 76050, 80000, 84050,
    88200, 92450, 96800, 101250, 105800, 110450, 115200, 120050, 125000, 130050, 135200, 140450, 145800, 151250, 156800, 162450,
    168200, 174050, 180000, 186050, 192200, 198450, 204800, 211250, 217800, 224450, 231200, 238050, 245000, 252050, 259200, 266450,
    273800, 281250, 288800, 296450, 304200, 312050, 320000, 328050, 336200, 344450, 352800, 361250, 369800, 378450, 387200, 396050,
    405000, 414050, 423200, 432450, 441800, 451250, 460800, 470450, 480200, 490050, 500000, 510050, 520200, 530450, 540800, 551250,
    561800, 572450, 583200, 594050, 605000, 616050, 627200, 638450, 649800, 661250, 672800, 684450, 696200, 708050, 720000, 732050,
    744200, 756450, 768800, 781250, 793800, 806450, 819200, 832050, 845000, 858050, 871200, 884450, 897800, 911250, 924800, 938450,
    952200, 966050, 980000, 994050, 1008200, 1022450, 1036800, 1051250, 1065800, 1080450, 1095200, 1110050, 1125000, 1140050, 1155200,
    1170450, 1185800, 1201250, 1216800, 1232450, 1248200, 1264050, 1280000, 1300000, 1340000, 1380000, 1420000, 1460000, 1500000, 1540000,
    1580000, 1700000, 1780000, 1820000, 1940000, 2400000, 2880000, 3220000, 4020000, 4220000, 4420000, 4620000, 5220000, 5820000, 6220000,
    7020000, 8020000, 9020000
];

/**
 * 坐骑属性
 */
export const mounts_attribute_keys = ["体质","魔力","力量","耐力","敏捷"];

/**
 * 获取坐骑每级所需经验
 * @param {*} level 
 * @returns 
 */
export function get_mounts_level_exp(level) {
    let max_exp = mounts_level_exp[level - 1];
    if (max_exp === undefined || max_exp === null) {
        return 9020000;
    }
    return max_exp;
}

/**
 * 构建坐骑数据
 * @param {*} mounts_name 
 */
export function build_mounts_data(mounts_name) {
    if(mounts_names.includes(mounts_name)){
        let mounts_data = {
            "等级": 1,
            "名称": mounts_name,
            "模型": mounts_name,
            "认证码": `${Date.now()}_${G.RandomUtils.generate_random(100, 999)}_${G.RandomUtils.generate_random(100, 999)}`,
            "初始成长": 1.0,
            "额外成长": 0,
            "坐骑技能": {
                "忠贯日月": 0,
                "正身清心": 0,
                "延年益寿": 0,
                "开天辟地": 0,
                "破釜沉州": 0,
                "大浪淘沙": 0,
                "炫火乱舞": 0,
                "金刚护身": 0,
                "偃旗息鼓": 0,
                "铜墙铁壁": 0,
                "水来土掩": 0,
                "飞火流星": 0,
                "乾坤借速": 0,
            },
            "种类": "坐骑",
            "饰品": null,
            "染色组": 0,
            "染色方案": null,
            "参战信息": null,
            "当前经验": 0,
            "最大经验": get_mounts_level_exp(1),
            "饱食度": 80,
            "好感度": 80,
            "主属性": null,
            "可用技能点": 0,
            "统御召唤兽": []
        };
        return mounts_data;
    }
    return undefined;
}

export function computing_mounts_data(mounts_data) {
    mounts_data["最大经验"] = get_mounts_level_exp(mounts_data["等级"]);
}